import Vue from 'vue'

Vue.directive('submit', {
  inserted (el, binding) {
    el.onsubmit = function (evt) {
      evt.preventDefault()
      if (binding.value) {
        binding.value.call(null, evt, binding.arg, binding.modifiers)
      }
    }
  }
})
//
//
// Vue.directive('auth', {
//   inserted (el, binding) {
//     if (!auth.chkAuth(binding.value)) {
//       el.style.display = 'none'
//     }
//   }
// })
